﻿@using QuocHoi_TV_Frontend.Models;
@{List<News> lstHotnews = DataModels.GetHotNews(4);}
<div class="tinmoinhat">
    <div class="tiletin">
        <a href="">Tiêu điểm</a>
    </div>
    <div class="video_tieudiem">
        <ul class="">
            @foreach (News item in lstHotnews)
            {
                string strlinkNewsest = Url.RouteUrl("NewsDetail",
                 new
                 {
                     controller = "News",
                     action = "NewsDetailHome",
                     cate_name = Util.RemoveSign4VietnameseString(item.Category.CateName),
                     year = DateTime.Parse(item.CreateDate.ToString()).Year,
                     month = DateTime.Parse(item.CreateDate.ToString()).Month,
                     news_title = Util.RemoveSign4VietnameseString(item.NewsTitle),
                     newsID = item.NewsID
                 }
                 );
                if (item.TypeNews == 1)
                {
                    strlinkNewsest = Url.RouteUrl("BroadCastDetail",
                                            new
                                            {
                                                controller = "Broadcast",
                                                action = "Detail",
                                                cate_name = Util.RemoveSign4VietnameseString(item.Category.CateName),
                                                news_title = Util.RemoveSign4VietnameseString(item.NewsTitle),
                                                newsID = item.NewsID
                                            });  
                }
                <li>
                    <div class="img_video_cm">
                        <a class="story" href="@Html.Raw(strlinkNewsest)">
                            <img width="300" height="169" alt="@Html.Raw(item.NewsTitle)" src="@item.PathImgSmall">
                            <span class="overlay">
                                <strong class="headline">@Html.Raw(NewsHelper.Sliptsubject(item.NewsTitle, 160))</strong>
                            </span>
                        </a>
                    </div>
                </li>
            }
        </ul>
    </div>
</div>
